import api from '@/http/index'

class Api {
    /* 获取专区列表 */
    static getTablesList(data) {
        return new Promise((resolve, reject) => {
            api.get('/api/Pages/GetGridJson', data).then((res) => {
                resolve(res);
            }).catch(err => {
                reject(err)
            })
        });
    }
    /* 获取板块列表 */
    static getPlateList(data) {
        return new Promise((resolve, reject) => {
            api.get('/api/Model/GetGridJson', data).then((res) => {
                resolve(res);
            }).catch(err => {
                reject(err)
            })
        });
    }
    /* 提交表单数据，进行参数修改*/
    static postSubmitForm = (data) => {
        return new Promise((resolve, reject) => {
            api.post('/api/Pages/SubmitForm', data).then((res) => {
                resolve(res);
            }).catch(err => {
                reject(err)
            })
        });
    };
    /* 根据id获取详细信息*/
    static getItemInfo = (data) => {
        return new Promise((resolve, reject) => {
            api.get('/api/Pages/GetFormJson', data).then((res) => {
                resolve(res);
            }).catch(err => {
                reject(err)
            })
        });
    };

}

export default Api

